import unittest
from lib.HTMLTestRunner_PY3 import HTMLTestRunner

if __name__ == '__main__':
	# 报告的代码
	# 1. 套件
	suite = unittest.TestLoader().discover('./script', 'test*')
	# 2. 打开文件
	with open('./report/tpshop登陆测试报告.html', 'wb') as f:
		# 3. 生成报告对象
		runner = HTMLTestRunner(f, verbosity=2)
		# 4. 执行套件
		runner.run(suite)
